package com.jamal2362.apktool;

import android.app.Application;
import android.content.res.Configuration;
import java.security.Security;
import com.jamal2362.apktool.util.Settings;
import sun1.security.provider.JavaProvider;

public class ApktoolApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();
		Security.addProvider(new JavaProvider());
		/*new Thread(){
		 @Override
		 public void run() {

		 }
		 }.start();*/
		Settings.init(ApktoolApplication.this);
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
	}

	@Override
	public void setTheme(int resid) {
		boolean lightTheme = Settings.getb(this, "light_theme", true);
		if (lightTheme) {
			super.setTheme(R.style.AppThemeLight);
		} else {
			super.setTheme(R.style.AppTheme);
		}
	}
}
